package encomendaFacil.bean;

import java.util.Date;

public class Package {

	private Long id;
	private String trackingCode;
	private String name;
	private Date beginDate;
	private Date lastModification;
	private User owner;
	private String status;
	private boolean isDelivered;
	
	public Package() {}
	
	public Package(Long id, String trackingCode, String name, Date beginDate, Date lastModification, User owner, String status, boolean isDelivered) {
		this.id = id;
		this.trackingCode = trackingCode;
		this.name = name;
		this.beginDate = beginDate;
		this.lastModification = lastModification;
		this.owner = owner;
		this.status = status;
		this.isDelivered = isDelivered;
	}
	
	public Long getId() {
		return id;
	}
	public String getTrackingCode() {
		return trackingCode;
	}
	public String getName() {
		return name;
	}
	public Date getBeginDate() {
		return beginDate;
	}
	public Date getLastModification() {
		return lastModification;
	}
	public User getOwner() {
		return owner;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public void setTrackingCode(String trackingCode) {
		this.trackingCode = trackingCode;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	public void setLastModification(Date lastModification) {
		this.lastModification = lastModification;
	}
	public void setOwner(User owner) {
		this.owner = owner;
	}
	
	public boolean hasId(){
		if (id != null) {
			return true;
		}
		return false;
	}

	public String getStatus() {
		return status;
	}

	public boolean isDelivered() {
		return isDelivered;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public void setDelivered(boolean isDelivered) {
		this.isDelivered = isDelivered;
	}
	
}
